//
//  AIHomeCollectionViewLayout.m
//  aixianfeng
//
//  Created by wangwei on 2016/12/24.
//  Copyright © 2016年 lijiangbo. All rights reserved.
//

#import "AIHomeCollectionViewLayout.h"

#define MARGIN  5

@implementation AIHomeCollectionViewLayout

- (void)prepareLayout {
    [super prepareLayout];
    
    //滚动方式
    self.scrollDirection = UICollectionViewScrollDirectionVertical;
    self.headerReferenceSize = CGSizeMake(LeeScreenWidth, LeeScreenHeight);
    
    self.itemSize = CGSizeMake((LeeScreenWidth - 3 * MARGIN)/2.0, 227);
  //  self.estimatedItemSize = CGSizeMake(200, 200);
    self.minimumInteritemSpacing = 0;
    self.minimumLineSpacing = 0;
    //设置 内边距
    self.sectionInset = UIEdgeInsetsMake(MARGIN, MARGIN, MARGIN, MARGIN);

}

@end
